<!doctype html>
<html class="no-js" lang="">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <title>nest-learn documentation</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <link rel="icon" type="image/x-icon" href="../images/favicon.ico">
	   <link rel="stylesheet" href="../styles/style.css">
        <link rel="stylesheet" href="../styles/dark.css">
    </head>
    <body>
          <script>
               // Blocking script to avoid flickering dark mode
               // Dark mode toggle button
               var useDark = window.matchMedia('(prefers-color-scheme: dark)');
               var darkModeState = useDark.matches;
               var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
               var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
               var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');

               function checkToggle(check) {
                    for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
                         $darkModeToggleSwitchers[i].checked = check;
                    }
               }

               function toggleDarkMode(state) {
                    if (window.localStorage) {
                         localStorage.setItem('compodoc_darkmode-state', state);
                    }

                    checkToggle(state);

                    const hasClass = document.body.classList.contains('dark');

                    if (state) {
                         for (var i = 0; i < $darkModeToggles.length; i++) {
                              $darkModeToggles[i].classList.add('dark');
                         }
                         if (!hasClass) {
                              document.body.classList.add('dark');
                         }
                    } else {
                         for (var i = 0; i < $darkModeToggles.length; i++) {
                              $darkModeToggles[i].classList.remove('dark');
                         }
                         if (hasClass) {
                              document.body.classList.remove('dark');
                         }
                    }
               }

               useDark.addEventListener('change', function (evt) {
                    toggleDarkMode(evt.matches);
               });
               if (darkModeStateLocal) {
                    darkModeState = darkModeStateLocal === 'true';
               }
               toggleDarkMode(darkModeState);
          </script>

        <div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
               <div class="d-flex">
                    <a href="../" class="navbar-brand">nest-learn documentation</a>
                    <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
               </div>
        </div>

        <div class="xs-menu menu" id="mobile-menu">
                <div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div>            <compodoc-menu></compodoc-menu>
        </div>

        <div class="container-fluid main">
           <div class="row main">
               <div class="d-none d-md-block menu">
                   <compodoc-menu mode="normal"></compodoc-menu>
               </div>
               <!-- START CONTENT -->
               <div class="content class">
                   <div class="content-data">












<ol class="breadcrumb">
  <li class="breadcrumb-item">Classes</li>
  <li class="breadcrumb-item" >AppController</li>
</ol>

<ul class="nav nav-tabs" role="tablist">
        <li class="nav-item">
            <a href="#info" 
                class="nav-link"
                class="nav-link active"
                role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
        </li>
        <li class="nav-item">
            <a href="#source" 
                class="nav-link"
                
                role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
        </li>
</ul>

<div class="tab-content">
    <div class="tab-pane fade active in" id="info">
        <p class="comment">
            <h3>File</h3>
        </p>
        <p class="comment">
            <code>src/app.controller.ts</code>
        </p>






            <section data-compodoc="block-index">
    <h3 id="index">Index</h3>
    <table class="table table-sm table-bordered index-table">
        <tbody>
                <tr>
                    <td class="col-md-4">
                        <h6><b>Properties</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Private</span>
                                <a href="#configService" >configService</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Private</span>
                                <a href="#jwtService" >jwtService</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Private</span>
                                <a href="#logger" >logger</a>
                            </li>
                        </ul>
                    </td>
                </tr>

                <tr>
                    <td class="col-md-4">
                        <h6><b>Methods</b></h6>
                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <ul class="index-list">
                            <li>
                                    <span class="modifier"></span>
                                <a href="#merge" >merge</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier"></span>
                                <a href="#testBigUpload" >testBigUpload</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier"></span>
                                    <span class="modifier"></span>
                                <a href="#testCustomDecorator" >testCustomDecorator</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Async</span>
                                <a href="#testGetConfig" >testGetConfig</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                <a href="#testInternalPipe" >testInternalPipe</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                <a href="#testInternalPipe2" >testInternalPipe2</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Async</span>
                                <a href="#testjwt" >testjwt</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                <a href="#testMergeDecorator" >testMergeDecorator</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                <a href="#testoss" >testoss</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Async</span>
                                <a href="#testoss2" >testoss2</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier">Async</span>
                                <a href="#testSession" >testSession</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                <a href="#testUploadByMulter" >testUploadByMulter</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier"></span>
                                <a href="#testUploadByMulter2" >testUploadByMulter2</a>
                            </li>
                            <li>
                                    <span class="modifier"></span>
                                    <span class="modifier"></span>
                                <a href="#testUploadByMulter3" >testUploadByMulter3</a>
                            </li>
                        </ul>
                    </td>
                </tr>





        </tbody>
    </table>
</section>

            <section data-compodoc="block-constructor">
    <h3 id="constructor">Constructor</h3>
        <table class="table table-sm table-bordered">
            <tbody>
                <tr>
                    <td class="col-md-4">
<code>constructor(appService: <a href="../injectables/AppService.html" target="_self">AppService</a>)</code>
                    </td>
                </tr>
                        <tr>
                            <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="43" class="link-to-prism">src/app.controller.ts:43</a></div>
                            </td>
                        </tr>

                <tr>
                    <td class="col-md-4">
                            <div>
                                    <b>Parameters :</b>
                                    <table class="params">
                                        <thead>
                                            <tr>
                                                <td>Name</td>
                                                    <td>Type</td>
                                                <td>Optional</td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                                <tr>
                                                        <td>appService</td>
                                                  
                                                        <td>
                                                                        <code><a href="../injectables/AppService.html" target="_self" >AppService</a></code>
                                                        </td>
                                                  
                                                    <td>
                                                            No
                                                    </td>
                                                    
                                                </tr>
                                        </tbody>
                                    </table>
                            </div>
                    </td>
                </tr>
            </tbody>
        </table>
</section>

            <section data-compodoc="block-properties">
    
    <h3 id="inputs">
        Properties
    </h3>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="configService"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Private</span>
                        <span ><b>configService</b></span>
                        <a href="#configService"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>ConfigService</code>

                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <b>Decorators : </b>
                        <br />
                        <code>
                            @Inject(ConfigService)<br />
                        </code>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="50" class="link-to-prism">src/app.controller.ts:50</a></div>
                        </td>
                    </tr>


        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="jwtService"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Private</span>
                        <span ><b>jwtService</b></span>
                        <a href="#jwtService"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
                <tr>
                    <td class="col-md-4">
                        <i>Type : </i>    <code>JwtService</code>

                    </td>
                </tr>
                <tr>
                    <td class="col-md-4">
                        <b>Decorators : </b>
                        <br />
                        <code>
                            @Inject(JwtService)<br />
                        </code>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="47" class="link-to-prism">src/app.controller.ts:47</a></div>
                        </td>
                    </tr>


        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="logger"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Private</span>
                        <span ><b>logger</b></span>
                        <a href="#logger"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
                <tr>
                    <td class="col-md-4">
                        <b>Decorators : </b>
                        <br />
                        <code>
                            @Inject(WINSTON_LOGGER_TOKEN)<br />
                        </code>
                    </td>
                </tr>
                    <tr>
                        <td class="col-md-4">
                                <div class="io-line">Defined in <a href="" data-line="53" class="link-to-prism">src/app.controller.ts:53</a></div>
                        </td>
                    </tr>


        </tbody>
    </table>
</section>

            <section data-compodoc="block-methods">
    
    <h3 id="methods">
        Methods
    </h3>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="merge"></a>
                    <span class="name">
                            <span class="modifier"></span>
                        <span ><b>merge</b></span>
                        <a href="#merge"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>merge(name: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;mergeFile&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="155"
                                    class="link-to-prism">src/app.controller.ts:155</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>name</td>
                                            <td>
                                                            <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/variables.html#id" target="_self" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testBigUpload"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier"></span>
                        <span ><b>testBigUpload</b></span>
                        <a href="#testBigUpload"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testBigUpload(files: Array<Express.Multer.File>, body)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Post(&#x27;bigUploads&#x27;)<br />@UseInterceptors(undefined)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="139"
                                    class="link-to-prism">src/app.controller.ts:139</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>files</td>
                                            <td>
                                                        <code>Array&lt;Express.Multer.File&gt;</code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                        <tr>
                                                <td>body</td>
                                            <td>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/variables.html#id" target="_self" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testCustomDecorator"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier"></span>
                            <span class="modifier"></span>
                        <span ><b>testCustomDecorator</b></span>
                        <a href="#testCustomDecorator"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testCustomDecorator()</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;decorator&#x27;)<br />@TestCustomDecorator(&#x27;admin&#x27;)<br />@UseGuards(TestGuard)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="66"
                                    class="link-to-prism">src/app.controller.ts:66</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testGetConfig"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Async</span>
                        <span ><b>testGetConfig</b></span>
                        <a href="#testGetConfig"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testGetConfig()</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;getconfig&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="243"
                                    class="link-to-prism">src/app.controller.ts:243</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                        <div class="io-description">
                            <b>Returns : </b>    <code>unknown</code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testInternalPipe"></a>
                    <span class="name">
                            <span class="modifier"></span>
                        <span ><b>testInternalPipe</b></span>
                        <a href="#testInternalPipe"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testInternalPipe(e: <a href="../undefineds/Ggg.html" target="_self">Ggg</a>)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;internalEnum/:enum&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="78"
                                    class="link-to-prism">src/app.controller.ts:78</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>e</td>
                                            <td>
                                                            <code><a href="../miscellaneous/enumerations.html#Ggg" target="_self" >Ggg</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/enumerations.html#Ggg" target="_self" >Ggg</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testInternalPipe2"></a>
                    <span class="name">
                            <span class="modifier"></span>
                        <span ><b>testInternalPipe2</b></span>
                        <a href="#testInternalPipe2"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testInternalPipe2(kkk: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;internalEnum&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="83"
                                    class="link-to-prism">src/app.controller.ts:83</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>kkk</td>
                                            <td>
                                                            <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testjwt"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Async</span>
                        <span ><b>testjwt</b></span>
                        <a href="#testjwt"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testjwt(authorization: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank">string</a>, response: Response)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;testjwt&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="259"
                                    class="link-to-prism">src/app.controller.ts:259</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>authorization</td>
                                            <td>
                                                            <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                        <tr>
                                                <td>response</td>
                                            <td>
                                                        <code>Response</code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>    <code>unknown</code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testMergeDecorator"></a>
                    <span class="name">
                            <span class="modifier"></span>
                        <span ><b>testMergeDecorator</b></span>
                        <a href="#testMergeDecorator"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testMergeDecorator(c)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;merge&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="72"
                                    class="link-to-prism">src/app.controller.ts:72</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>c</td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testoss"></a>
                    <span class="name">
                            <span class="modifier"></span>
                        <span ><b>testoss</b></span>
                        <a href="#testoss"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testoss()</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;oss&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="181"
                                    class="link-to-prism">src/app.controller.ts:181</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/variables.html#id" target="_self" >void</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testoss2"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Async</span>
                        <span ><b>testoss2</b></span>
                        <a href="#testoss2"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testoss2()</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;oss2&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="212"
                                    class="link-to-prism">src/app.controller.ts:212</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >any</a></code>

                        </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testSession"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier">Async</span>
                        <span ><b>testSession</b></span>
                        <a href="#testSession"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testSession(session)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Get(&#x27;sss&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="252"
                                    class="link-to-prism">src/app.controller.ts:252</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>session</td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>    <code>unknown</code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testUploadByMulter"></a>
                    <span class="name">
                            <span class="modifier"></span>
                        <span ><b>testUploadByMulter</b></span>
                        <a href="#testUploadByMulter"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testUploadByMulter(file: Express.Multer.File, body)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Post(&#x27;upload&#x27;)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="92"
                                    class="link-to-prism">src/app.controller.ts:92</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>file</td>
                                            <td>
                                                        <code>Express.Multer.File</code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                        <tr>
                                                <td>body</td>
                                            <td>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/variables.html#id" target="_self" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testUploadByMulter2"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier"></span>
                        <span ><b>testUploadByMulter2</b></span>
                        <a href="#testUploadByMulter2"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testUploadByMulter2(files: Array<Express.Multer.File>, body)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Post(&#x27;uploads&#x27;)<br />@UseInterceptors(undefined)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="107"
                                    class="link-to-prism">src/app.controller.ts:107</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>files</td>
                                            <td>
                                                        <code>Array&lt;Express.Multer.File&gt;</code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                        <tr>
                                                <td>body</td>
                                            <td>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/variables.html#id" target="_self" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
    <table class="table table-sm table-bordered">
        <tbody>
            <tr>
                <td class="col-md-4">
                    <a name="testUploadByMulter3"></a>
                    <span class="name">
                            <span class="modifier"></span>
                            <span class="modifier"></span>
                        <span ><b>testUploadByMulter3</b></span>
                        <a href="#testUploadByMulter3"><span class="icon ion-ios-link"></span></a>
                    </span>
                </td>
            </tr>
            <tr>
                <td class="col-md-4">
                        <span class="modifier-icon icon ion-ios-reset"></span>
                    <code>testUploadByMulter3(files: Array<Express.Multer.File>, body)</code>
                </td>
            </tr>

            <tr>
                <td class="col-md-4">
                    <b>Decorators : </b>
                    <br />
                    <code>@Post(&#x27;uploads&#x27;)<br />@UseInterceptors(undefined)<br /></code>
                </td>
            </tr>

                    <tr>
                        <td class="col-md-4">
                            <div class="io-line">Defined in <a href="" data-line="125"
                                    class="link-to-prism">src/app.controller.ts:125</a></div>
                        </td>
                    </tr>


            <tr>
                <td class="col-md-4">

                            <div class="io-description">
                                <b>Parameters :</b>
                                
                                <table class="params">
                                    <thead>
                                        <tr>
                                            <td>Name</td>
                                                <td>Type</td>
                                            <td>Optional</td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                                <td>files</td>
                                            <td>
                                                        <code>Array&lt;Express.Multer.File&gt;</code>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                        <tr>
                                                <td>body</td>
                                            <td>
                                            </td>

                                            <td>
                                                    No
                                            </td>


                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        <div class="io-description">
                            <b>Returns : </b>        <code><a href="../miscellaneous/variables.html#id" target="_self" >void</a></code>

                        </div>
                            <div class="io-description">
                                
                            </div>
                </td>
            </tr>
        </tbody>
    </table>
</section>





    </div>


    <div class="tab-pane fade  tab-source-code" id="source">
        <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import {
  Body,
  Controller,
  DefaultValuePipe,
  Get,
  Headers,
  Inject,
  Logger,
  Param,
  ParseEnumPipe,
  Post,
  Query,
  Res,
  Session,
  UnauthorizedException,
  UploadedFile,
  UploadedFiles,
  UseGuards,
  UseInterceptors,
} from &#x27;@nestjs/common&#x27;;
import { AppService } from &#x27;./app.service&#x27;;
import { TestCustomDecorator } from &#x27;./TestCustomDecorator&#x27;;
import { TestGuard } from &#x27;./TestGuard&#x27;;
import { Ddd, MergeTest, TestMergeDecorator } from &#x27;./TestMergeDecorator&#x27;;
import { FileInterceptor, FilesInterceptor } from &#x27;@nestjs/platform-express&#x27;;
import * as fs from &#x27;fs&#x27;;
import { WINSTON_LOGGER_TOKEN } from &#x27;./winston/winston.module&#x27;;
import { ConfigService } from &#x27;@nestjs/config&#x27;;
import { JwtService } from &#x27;@nestjs/jwt&#x27;;
import { Response } from &#x27;express&#x27;;
const OSS &#x3D; require(&#x27;ali-oss&#x27;);
const path &#x3D; require(&#x27;path&#x27;);
const mysql &#x3D; require(&#x27;mysql2&#x27;);

enum Ggg {
  AAA &#x3D; &#x27;111&#x27;,
  BBB &#x3D; &#x27;222&#x27;,
  CCC &#x3D; &#x27;333&#x27;,
}
// @Controller()
// @Ddd()
@MergeTest(&#x27;&#x27;, &#x27;is good&#x27;)
export class AppController {
  constructor(private readonly appService: AppService) {}

  @Inject(JwtService)
  private jwtService: JwtService;

  @Inject(ConfigService)
  private configService: ConfigService;

  @Inject(WINSTON_LOGGER_TOKEN)
  private logger;

  // @Get()
  // @UseGuards(TestGuard)
  // async getHello() {
  //   this.logger.warn(&#x27;abin&#x27;, AppController.name);
  //   return this.appService.getHello();
  // }

  // 自定义装饰器
  @Get(&#x27;decorator&#x27;)
  @TestCustomDecorator(&#x27;admin&#x27;)
  @UseGuards(TestGuard)
  testCustomDecorator() {
    return &#x27;test cutsom decorator&#x27;;
  }

  // 合并装饰器
  @Get(&#x27;merge&#x27;)
  testMergeDecorator(@TestMergeDecorator(&#x27;accept&#x27;) c) {
    return c;
  }

  // 内置pipe
  @Get(&#x27;internalEnum/:enum&#x27;)
  testInternalPipe(@Param(&#x27;enum&#x27;, new ParseEnumPipe(Ggg)) e: Ggg) {
    return e;
  }

  @Get(&#x27;internalEnum&#x27;)
  testInternalPipe2(@Query(&#x27;kkk&#x27;, new DefaultValuePipe(&#x27;aaa&#x27;)) kkk: string) {
    return kkk;
  }

  // 用multer实现上传
  @Post(&#x27;upload&#x27;)
  // @UseInterceptors(FileInterceptor(&#x27;aaa&#x27;, {
  //   dest: &#x27;uploads&#x27;
  // }))
  testUploadByMulter(@UploadedFile() file: Express.Multer.File, @Body() body) {
    console.log(&#x27;body&#x27;, body);
    console.log(&#x27;file&#x27;, file);
  }

  // 用multer实现上传
  @Post(&#x27;uploads&#x27;)
  // @UseInterceptors(FileInterceptor(&#x27;aaa&#x27;, {
  //   dest: &#x27;uploads&#x27;
  // }))
  @UseInterceptors(
    FilesInterceptor(&#x27;bbb&#x27;, 3, {
      dest: &#x27;uploads&#x27;,
    }),
  )
  testUploadByMulter2(
    @UploadedFiles() files: Array&lt;Express.Multer.File&gt;,
    @Body() body,
  ) {
    console.log(&#x27;body&#x27;, body);
    console.log(&#x27;files&#x27;, files);
  }

  // 用multer实现上传,key, val
  @Post(&#x27;uploads&#x27;)
  // @UseInterceptors(FileInterceptor(&#x27;aaa&#x27;, {
  //   dest: &#x27;uploads&#x27;
  // }))
  @UseInterceptors(
    FilesInterceptor(&#x27;bbb&#x27;, 3, {
      dest: &#x27;uploads&#x27;,
    }),
  )
  testUploadByMulter3(
    @UploadedFiles() files: Array&lt;Express.Multer.File&gt;,
    @Body() body,
  ) {
    console.log(&#x27;body&#x27;, body);
    console.log(&#x27;files&#x27;, files);
  }

  @Post(&#x27;bigUploads&#x27;)
  @UseInterceptors(
    FilesInterceptor(&#x27;files&#x27;, 20, {
      dest: &#x27;uploads&#x27;,
    }),
  )
  testBigUpload(
    @UploadedFiles() files: Array&lt;Express.Multer.File&gt;,
    @Body() body,
  ) {
    console.log(&#x27;body&#x27;, body);
    console.log(&#x27;files&#x27;, files);
    const fileName &#x3D; body.name.match(/(.+)\-\d+$/)[1];
    const chunkDir &#x3D; &#x27;uploads/chunks_&#x27; + fileName;
    if (!fs.existsSync(chunkDir)) {
      fs.mkdirSync(chunkDir);
    }
    fs.cpSync(files[0].path, chunkDir + &#x27;/&#x27; + body.name);
    fs.rmSync(files[0].path);
  }

  @Get(&#x27;mergeFile&#x27;)
  merge(@Query(&#x27;name&#x27;) name: string) {
    const chunkDir &#x3D; &#x27;uploads/chunks_&#x27; + name;
    const files &#x3D; fs.readdirSync(chunkDir);
    let count &#x3D; 0;
    let startPos &#x3D; 0;
    files.map((file) &#x3D;&gt; {
      const filePath &#x3D; chunkDir + &#x27;/&#x27; + file;
      const stream &#x3D; fs.createReadStream(filePath);
      stream
        .pipe(
          fs.createWriteStream(&#x27;uploads/&#x27; + name, {
            start: startPos,
          }),
        )
        .on(&#x27;finish&#x27;, () &#x3D;&gt; {
          count++;
          if (count &#x3D;&#x3D;&#x3D; files.length) {
            fs.rm(chunkDir, { recursive: true }, () &#x3D;&gt; {});
          }
        });

      startPos +&#x3D; fs.statSync(filePath).size;
    });
  }

  @Get(&#x27;oss&#x27;)
  testoss() {
    const client &#x3D; new OSS({
      // yourregion填写Bucket所在地域。以华东1（杭州）为例，Region填写为oss-cn-hangzhou。
      region: &#x27;oss-cn-beijing&#x27;,
      // 从环境变量中获取访问凭证。运行本代码示例之前，请确保已设置环境变量OSS_ACCESS_KEY_ID和OSS_ACCESS_KEY_SECRET。
      accessKeyId: &#x27;LTAI5tDockwd59MucH7TYB1b&#x27;,
      accessKeySecret: &#x27;o1qUaucDqn311MT5vcj3ZfXz0hiTZQ&#x27;,
      // 填写Bucket名称。
      bucket: &#x27;abin-1&#x27;,
    });

    async function put() {
      try {
        // 填写OSS文件完整路径和本地文件的完整路径。OSS文件完整路径中不能包含Bucket名称。
        // 如果本地文件的完整路径中未指定本地路径，则默认从示例程序所属项目对应本地路径中上传文件。
        const result &#x3D; await client.put(
          &#x27;1.jpg&#x27;,
          path.normalize(
            &#x27;/Users/abin/learn/nest-learn/uploads/403953_461724913838_.pic.jpg&#x27;,
          ),
        );
        console.log(result);
      } catch (e) {
        console.log(e);
      }
    }

    put();
  }

  @Get(&#x27;oss2&#x27;)
  async testoss2() {
    const config &#x3D; {
      // yourregion填写Bucket所在地域。以华东1（杭州）为例，Region填写为oss-cn-hangzhou。
      region: &#x27;oss-cn-beijing&#x27;,
      // 从环境变量中获取访问凭证。运行本代码示例之前，请确保已设置环境变量OSS_ACCESS_KEY_ID和OSS_ACCESS_KEY_SECRET。
      accessKeyId: &#x27;LTAI5tDockwd59MucH7TYB1b&#x27;,
      accessKeySecret: &#x27;o1qUaucDqn311MT5vcj3ZfXz0hiTZQ&#x27;,
      // 填写Bucket名称。
      bucket: &#x27;abin-1&#x27;,
    };
    const client &#x3D; new OSS(config);

    const date &#x3D; new Date();

    date.setDate(date.getDate() + 1);
    const res &#x3D; client.calculatePostSignature({
      expiration: date.toISOString(),
      conditions: [
        [&#x27;content-length-range&#x27;, 0, 1048576000], //设置上传文件的大小限制。
      ],
    });
    console.log(res);

    const location &#x3D; await client.getBucketLocation();

    const host &#x3D; &#x60;http://${config.bucket}.${location.location}.aliyuncs.com&#x60;;

    console.log(host);
  }

  @Get(&#x27;getconfig&#x27;)
  async testGetConfig() {
    return {
      // aaa: this.configService.get(&#x27;mysql_server_host&#x27;),
      db: this.configService.get(&#x27;db&#x27;),
      config: this.configService.get(&#x27;aaa.bbb.ccc&#x27;),
    };
  }

  @Get(&#x27;sss&#x27;)
  async testSession(@Session() session) {
    console.log(session);
    session.count &#x3D; session.count ? session.count + 1 : 1;
    return session.count;
  }

  @Get(&#x27;testjwt&#x27;)
  async testjwt(
    @Headers(&#x27;authorization&#x27;) authorization: string,
    @Res({ passthrough: true }) response: Response,
  ) {
    if (authorization) {
      try {
        const token &#x3D; authorization.split(&#x27; &#x27;)[1];
        const data &#x3D; this.jwtService.verify(token);
        const newToken &#x3D; this.jwtService.sign({
          count: data.count + 1,
        });
        response.setHeader(&#x27;token&#x27;, newToken);
        return data.count + 1;
      } catch (e) {
        console.log(e);
        throw new UnauthorizedException();
      }
    } else {
      const newToken &#x3D; this.jwtService.sign({
        count: 1,
      });
      response.setHeader(&#x27;token&#x27;, newToken);
      return 1;
    }
  }
}
</code></pre>
    </div>
</div>









                   </div><div class="search-results">
    <div class="has-results">
        <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
        <ul class="search-results-list"></ul>
    </div>
    <div class="no-results">
        <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
    </div>
</div>
</div>
               <!-- END CONTENT -->
           </div>
       </div>

          <label class="dark-mode-switch">
               <input type="checkbox">
               <span class="slider">
                    <svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
                    <path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
                    </svg>
               </span>
          </label>

       <script>
            var COMPODOC_CURRENT_PAGE_DEPTH = 1;
            var COMPODOC_CURRENT_PAGE_CONTEXT = 'class';
            var COMPODOC_CURRENT_PAGE_URL = 'AppController.html';
            var MAX_SEARCH_RESULTS = 15;
       </script>

       <script>
               $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
               checkToggle(darkModeState);
               if ($darkModeToggleSwitchers.length > 0) {
                    for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
                         $darkModeToggleSwitchers[i].addEventListener('change', function (event) {
                              darkModeState = !darkModeState;
                              toggleDarkMode(darkModeState);
                         });
                    }
               }
          </script>

       <script src="../js/libs/custom-elements.min.js"></script>
       <script src="../js/libs/lit-html.js"></script>

       <script src="../js/menu-wc.js" defer></script>
       <script nomodule src="../js/menu-wc_es5.js" defer></script>

       <script src="../js/libs/bootstrap-native.js"></script>

       <script src="../js/libs/es6-shim.min.js"></script>
       <script src="../js/libs/EventDispatcher.js"></script>
       <script src="../js/libs/promise.min.js"></script>
       <script src="../js/libs/zepto.min.js"></script>

       <script src="../js/compodoc.js"></script>

       <script src="../js/tabs.js"></script>
       <script src="../js/menu.js"></script>
       <script src="../js/libs/clipboard.min.js"></script>
       <script src="../js/libs/prism.js"></script>
       <script src="../js/sourceCode.js"></script>
          <script src="../js/search/search.js"></script>
          <script src="../js/search/lunr.min.js"></script>
          <script src="../js/search/search-lunr.js"></script>
          <script src="../js/search/search_index.js"></script>
       <script src="../js/lazy-load-graphs.js"></script>


    </body>
</html>
